/*    
    //存储
    function setCookie(cname,cvalue,time) // 分钟
    {
      var d = new Date();
      d.setTime(d.getTime()+(time*60*1000));
      var expires = "expires="+d.toGMTString();
      document.cookie = cname + "=" + cvalue + "; " + expires;
    }
    
    //获取
    function getCookie(cname)
    {
      var name = cname + "=";
      var ca = document.cookie.split(';');
      for(var i=0; i<ca.length; i++) 
      {
        var c = ca[i].trim();
        if (c.indexOf(name)==0) return c.substring(name.length,c.length);
      }
      return "";
    }
    
    //检测
    function checkCookie()
    {
      var username=getCookie("username");
      if (username!="")
      {
        alert("Welcome again " + username);
      }
      else 
      {
        username = prompt("Please enter your name:","");
        if (username!="" && username!=null)
        {
          setCookie("username",username,365);
        }
      }
    }*/
    
    
    
    
    /*新*/
    
    /**
 * 默认的cookie写入方法
 * @param name
 * @param value
 */
function setCookie(name,value){
    var Days = 1;
    var exp = new Date();
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = name + "="+ encodeURI (value) + ";expires=" + exp.toGMTString()+";path=/leasingCalculator";
}
/**
 * 获取Cookie中的值
 * @param objName
 * @returns
 */
function getCookie(objName){//获取指定名称的cookie的值 
    var arrStr = document.cookie.split("; "); 
    for (var i = 0; i < arrStr.length; i++) { 
        var temp = arrStr[i].split("="); 
        if (temp[0] == objName){ 
            return decodeURI(temp[1]); 
        }
    } 
}
